<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <title>催办</title>
  <link href="/static/css/bootstrap.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="/static/include/css/style.css">
</head>
<body class="white-bg" style="height: 95%">

<div>
  <table class="form-table">

    <tr>
      <th>
        <span class="required">*</span><span>催办提醒：</span>
      </th>
      <td>
        <textarea id="opinion" style="resize: none;" rows="4" cols="20" class="form-control"></textarea>
      </td>
    </tr>
    <tr>
      <th><span class="required">*</span>消息类型： </th>
      <td>
        <label class="check-box">
          <input type="checkbox" name="msgType" value="weixin" class="fl mt3 mr5"/>公众号推送
        </label>
        <label class="check-box">
          <input type="checkbox" name="msgType" value="email" checked class="fl mt3 mr5"/>邮件
        </label>
        <label class="check-box">
          <input type="checkbox" name="msgType" value="dingding" class="fl mt3 mr5"/>钉钉消息
        </label>
        <label class="check-box">
          <input type="checkbox" name="msgType" value="sms" class="fl mt3 mr5"/>短信
        </label>
      </td>
    </tr>
    <tr>
      <th><span class="required">*</span><span>是否加急任务：</span></th>
      <td>
        <div class="mb0">
          <label class="mr5 radio-box">  <input type="radio" value="true" name="isUrgent">是</label>

          <label class="mr5 radio-box">  <input type="radio" value="false" checked name="isUrgent">否</label>
        </div>
      </td>
    </tr>
    <tr><td colspan="2" class="text-muted">会对当前实例所有候选人推送催办消息，若选择了加急、则任务会靠前展示</td></tr>
  </table>
</div>


<script src="/static/include/js/footer.js"></script>
<script>
  $(function () {

  })

  function submitHandler() {
    if (!$('#opinion').val()){
      $.modal.msgWarning('请填写催办提醒！')
      return false
    }
    parent.window.nowButton.opinion =  $('#opinion').val()
    parent.window.nowButton.configPage = ''
    var msgType = []
    $('input[name="msgType"]:checked').each(function(){
      msgType.push($(this).val());
    });
    var data = {
      isUrgent: $('input[name="isUrgent"]:checked').val(),
      msgType: msgType.join(',')
    }
    parent.window.bpmParams = Object.assign({}, parent.window.bpmParams, {extendConf: data})
    parent.window.postFn(parent.window.nowButton)
  }
</script>
</body>
</html>
